package com.guoyh.xprodatas.service.wmodel.navi

import com.guoyh.baserepos.entity.wmodel.NaviBeanItem
import com.guoyh.pronet.service.BaseService
import rxhttp.IAwait
import rxhttp.wrapper.param.RxHttp
import rxhttp.wrapper.param.toResponse

/**
 * @CreateDate: 7/29/21 11:30 AM
 * @Author: guoyh
 * @Description: java类作用描述
 */

val wModelNaviApi by lazy {
    WMNaviApiService.instance
}

class WMNaviApiService private constructor() : BaseService() {

    companion object {
        const val NAVI_LIST = "navi/json"

        val instance: WMNaviApiService by lazy(mode = LazyThreadSafetyMode.SYNCHRONIZED) {
            WMNaviApiService()
        }

    }

    /**
     * 获取项目全部分类
     */
    fun getNaviList(): IAwait<MutableList<NaviBeanItem>> {
        return RxHttp.get(NAVI_LIST)
            .toResponse()
    }


}